#ifndef INFODIALOG_H
#define INFODIALOG_H

#include <QDialog>
#include <QJsonObject>

namespace Ui {
class InfoDialog;
}
enum InfoDlgType{
    ADD_ITEM = 0,
    MODIFY,
    DELETE,
};

class InfoDialog : public QDialog
{
    Q_OBJECT

public:
    explicit InfoDialog(QWidget *parent = nullptr);
    ~InfoDialog();

    void setType(int type);
    void setTitle(QString title);
    void setContent(QJsonObject &item);
signals:
    void ev(const int type); // 定义发送数据的信号

private slots:
    void on_buttonBox_accepted();

    void on_buttonBox_rejected();

    void on_pickDir_clicked();

private:
    Ui::InfoDialog *ui;
    int type;
};

#endif // INFODIALOG_H
